home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Columbia Kermit
/
kermit.zip
/
newsgroups
/
CURRENT
/
000330_arthur.marsh@internode.on.net_Mon Mar 22 11:41:06 2010.msg
< prev
next >
Wrap
Internet Message Format
|
2020-01-01
|
5KB
Path: reader1.panix.com!panix!usenet.stanford.edu!news.kjsl.com!news.alt.net!news.astraweb.com!border1.newsrouter.astraweb.com!not-for-mail
Message-ID: <4BA76359.6090405@internode.on.net>
Date: Mon, 22 Mar 2010 23:02:25 +1030
From: Arthur Marsh <arthur.marsh@internode.on.net>
User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20091109)
MIME-Version: 1.0
Newsgroups: comp.protocols.kermit.misc,gmane.linux.debian.user
Followup-To: comp.protocols.kermit.misc
To: Dotan Cohen <dotancohen@gmail.com>
Subject: Re: Transferring files over SSH in the console
References: <880dece01003211552le9d6018odb9bd683c3c897a9@mail.gmail.com> <201003212314.32985.reidac@bellatlantic.net> <201003212325.49742.reidac@bellatlantic.net> <880dece01003220152p3c8d50e1le80fe6bab5522601@mail.gmail.com>
In-Reply-To: <880dece01003220152p3c8d50e1le80fe6bab5522601@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 119
Organization: Unlimited download news at news.astraweb.com
NNTP-Posting-Host: 42524105.news.astraweb.com
X-Trace: DXC=l9bHn;8S3NG5\iVS6:P;:IL?0kYOcDh@J:_2G`<BJJVCT61>?HMHR[O[1L?Z<PkcbHUf\1e4^AmFF
Xref: panix comp.protocols.kermit.misc:15932
Dotan Cohen wrote, on 2010-03-22 19:22:
>>> As others have commented, you can use scp or sftp.
>>>
>>> However, I can imagine that embedded might not have the
>>> sftp service or the scp executable.
>>>
>>> If that's your case, you can always do:
>>>
>>> # cat file | ssh remote 'cat > destinaton'
>> Pardon my replying to myself, but I've now seen a bunch of the
>> rest of the thread, and it seems to me that, if the set of commands
>> you want to do is repeatable, then maybe what you want is to do
>> most of the remote-system operations through SSH commands this way?
>>
>> Someone else may have already suggested this, but something
>> like:
>>
>> # cat file.tgz | ssh remote 'cat > dest.tgz' (or scp, if available)
>> # ssh remote 'tar -xf dest.tgz'
>> # ssh remote 'sh dest/installer' (or whatever)
>> # ssh remote 'cat dest/install-log' > remote-install-log (or whatever)
>>
>> This way, you still only have the one shell, and/but you
>> pay the price in having to prefix all the remote operations
>> with "ssh remote". However, you could script this on the
>> local system (which is, I think, why you want a single
>> session, right, so you can script it?), and then the extra
>> typing doesn't really cost you much.
>>
>
> Thanks for the idea, Andrew, but I'm actually not scripting this.
> Right now I have two windows open: one for sftp and one for shell
> commands. I was hoping to save myself the trouble of switching
> windows, keeping the cd in sync, etc, with something that supports
> both sftp commands and ssh commands. I don't want to increase my
> workload by prefixing all the commands.
>
I regularly use C-Kermit to do this kind of thing, but using telnetd-ssl
on the target machine rather than sshd.
Have a look at:
http://www.columbia.edu/kermit/ck90.html
To get a full range of features I download the source from the above
site and do a:
make linux+openssl+zlib+shadow+pam
followed by
checkinstall make install
on Debian. (You need packages for checkinstall openssl, openssl-dev,
zlib, but it builds easily)
An example of logging in to the remote machine, obtaining and building
C-Kermit on that machine, then using C-Kermit to download the source
tarball on that machine follows:
C-Kermit>telnet 192.168.1.101
Trying 192.168.1.101... (OK)
Negotiations........Authenticating with SSL
[TLS - AES256-SHA SSLv3 Kx=RSA Au=RSA Enc=AES(256)
Mac=SHA1
Compression: zlib compression
(OK)
Password:
Last login: Mon Mar 22 18:19:12 CST 2010 from 192.168.1.100 on pts/0
Linux am64 2.6.32 #1 SMP PREEMPT Thu Mar 18 15:44:10 CST 2010 x86_64
amarsh04@remote:~/kermit-src$ kermit
C-Kermit 9.0.299 Alpha.02, 1 Feb 2010, for Linux+SSL
Copyright (C) 1985, 2010,
Trustees of Columbia University in the City of New York.
Type ? or HELP for help.
(/home/amarsh04/kermit-src/) C-Kermit>ftp ftp.columbia.edu
Connected to ftp.columbia.edu.
Name (ftp.columbia.edu:amarsh04): anonymous
Password:
Login successful.
Switching LOCUS for file-management commands to REMOTE (HELP LOCUS for
info).
Remote system type is UNIX.
Default transfer mode is BINARY
(/home/amarsh04/kermit-src/) C-Kermit>cd kermit/test/tar
Directory successfully changed.
(/home/amarsh04/kermit-src/) C-Kermit>get x26.tar.gz
(/home/amarsh04/kermit-src/) C-Kermit>q
Goodbye.
amarsh04@remote:~/kermit-src$ gzip -dc x26.tar.gz|tar -xvf /dev/fd/0
then edited the makefile to change prefix to /usr and manroot to
$(prefix)/share
then ran:
make linux+openssl+zlib+shadow+pam
checkinstall make install
To move the x.26.tar.gz file to the local machine I ran:
amarsh04@remote:~/kermit-src$ kermit -s x26.tar.gz
Return to your local Kermit and give a RECEIVE command.
KERMIT READY TO SEND...
SENT: [/home/amarsh04/kermit-src/x26.tar.gz] To:
[/home/amarsh04/kermit-src/x26.tar.gz] (OK)
C-Kermit does telnet client including with ssl and other
encryption/authentication options, SSH client using an external ssh
program, ftp client, and kermit client and server.
C-Kermit is worth a look at and an investment in some time learning how
to use it.
Arthur.